<template>
      <header class="header">
        <h1>todos</h1>
        <input v-on:keyup.enter="addTodo" class="new-todo" placeholder="What needs to be done?" autofocus>
      </header>
</template>
<script>
  export default {
    data(){
      return {

      }
    },
    methods:{
      addTodo(even) {
        const target = even.target
        this.$emit("addTodaData",even.target.value)
        target.value = ''
        
      }

    }
  }
</script>